﻿layui.use('layer', function () {
    var $ = layui.$;
    var layer = layui.layer;
    var util = layui.util;
    var form = layui.form;
    var table = layui.table;
    $(function () {
        Show();
    })
    function Show() {
        $.ajax({
            url: '/Delivery/DeliveryModel',
            type: 'get',
            data: { deliveryId: localStorage.getItem("deliveryId"), token: localStorage.getItem("token") },
            success: function (res) {
                var s = JSON.parse(res)
                console.log(s);
                $(s.data).each(function () {
                    $('#deliveryName').val(this.deliveryName)
                    $('#deliveryNumber').val(this.deliveryNumber)
                    $('#deliveryDate').val(this.deliveryDate.substring(0, 10))
                    $('#orderNumber').val(this.orderNumber)
                    $('#remark').val(this.remark)
                    $('#finishedProductName').val(this.finishedProductName)
                    $('#finishedProductNumber').val(this.finishedProductNumber)
                    $('#specification').val(this.specification)
                    $('#unit').val(this.unit)
                    $('#productionNumber').val(this.productionNumber)
                    $('#outboundQuantity').val(this.outboundQuantity)
                    $('#warehouseName').val(this.warehouseName)
                    $('#dateTime').val(this.dateTime.substring(0, 10))
                    $('#warehousePerson').val(this.warehousePerson)
                    form.render('select');
                })
            }
        })
    }
});
